﻿using System;
using System.Collections.Generic;
using System.IO;
using SEXY;
using UniRx;
using UniRx.Triggers;
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.UI;

namespace Studio
{
	// Token: 0x0200057F RID: 1407
	public class MPCharCtrl : MonoBehaviour
	{
		// Token: 0x17000457 RID: 1111
		// (set) Token: 0x060023E9 RID: 9193 RVA: 0x000D7C54 File Offset: 0x000D5E54
		public OCIChar ociChar
		{
			set
			{
				this.m_OCIChar = value;
				if (this.m_OCIChar != null)
				{
					this.UpdateInfo();
				}
			}
		}

		// Token: 0x17000458 RID: 1112
		// (get) Token: 0x060023EA RID: 9194 RVA: 0x000D7C70 File Offset: 0x000D5E70
		// (set) Token: 0x060023EB RID: 9195 RVA: 0x000D7C80 File Offset: 0x000D5E80
		public bool active
		{
			get
			{
				return base.gameObject.activeSelf;
			}
			set
			{
				if (base.gameObject.activeSelf != value)
				{
					base.gameObject.SetActive(value);
					if (!base.gameObject.activeSelf)
					{
						this.OnClickRoot(-1);
					}
				}
			}
		}

		// Token: 0x060023EC RID: 9196 RVA: 0x000D7CB8 File Offset: 0x000D5EB8
		public void OnClickRoot(int _idx)
		{
			this.select = _idx;
			for (int i = 0; i < this.rootButtonInfo.Length; i++)
			{
				this.rootButtonInfo[i].active = (i == _idx);
			}
			this.animeControl.active = (_idx == 2);
			this.voiceControl.active = (_idx == 3);
			switch (_idx)
			{
			case 0:
				this.stateInfo.UpdateInfo(this.m_OCIChar);
				break;
			case 1:
				this.fkInfo.UpdateInfo(this.m_OCIChar);
				this.ikInfo.UpdateInfo(this.m_OCIChar);
				this.lookAtInfo.UpdateInfo(this.m_OCIChar);
				this.neckInfo.UpdateInfo(this.m_OCIChar);
				this.poseInfo.UpdateInfo(this.m_OCIChar);
				this.etcInfo.UpdateInfo(this.m_OCIChar);
				break;
			case 2:
				this.animeGroupList.InitList((AnimeGroupList.SEX)this.m_OCIChar.oiCharInfo.sex);
				this.animeControl.objectCtrlInfo = this.m_OCIChar;
				break;
			case 3:
				this.voiceControl.ociChar = this.m_OCIChar;
				break;
			case 4:
				this.costumeInfo.UpdateInfo(this.m_OCIChar);
				break;
			case 5:
				this.jointInfo.UpdateInfo(this.m_OCIChar);
				break;
			}
		}

		// Token: 0x060023ED RID: 9197 RVA: 0x000D7E2C File Offset: 0x000D602C
		public void OnClickKinematic(int _idx)
		{
			if (this.kinematic == _idx)
			{
				return;
			}
			MPCharCtrl.CommonInfo[] array = new MPCharCtrl.CommonInfo[]
			{
				this.fkInfo,
				this.ikInfo,
				this.lookAtInfo,
				this.neckInfo,
				null,
				this.etcInfo,
				this.poseInfo
			};
			if (MathfEx.RangeEqualOn<int>(0, this.kinematic, array.Length - 1) && array[this.kinematic] != null)
			{
				array[this.kinematic].active = false;
				this.buttonKinematic[this.kinematic].image.color = Color.white;
			}
			this.kinematic = _idx;
			if (array[this.kinematic] != null)
			{
				array[this.kinematic].active = true;
				array[this.kinematic].UpdateInfo(this.m_OCIChar);
				this.buttonKinematic[this.kinematic].image.color = Color.green;
			}
		}

		// Token: 0x060023EE RID: 9198 RVA: 0x000D7F24 File Offset: 0x000D6124
		public void LoadAnime(AnimeGroupList.SEX _sex, int _group, int _category, int _no)
		{
			if (this.m_OCIChar.oiCharInfo.sex != (int)_sex)
			{
				return;
			}
			if (_sex != AnimeGroupList.SEX.Male)
			{
				if (_sex == AnimeGroupList.SEX.Female)
				{
					OCICharFemale ocicharFemale = this.m_OCIChar as OCICharFemale;
					ocicharFemale.LoadAnime(_group, _category, _no, 0f);
				}
			}
			else
			{
				OCICharMale ocicharMale = this.m_OCIChar as OCICharMale;
				ocicharMale.LoadAnime(_group, _category, _no, 0f);
			}
		}

		// Token: 0x060023EF RID: 9199 RVA: 0x000D7F9C File Offset: 0x000D619C
		private void UpdateInfo()
		{
			this.OnClickRoot(this.select);
		}

		// Token: 0x060023F0 RID: 9200 RVA: 0x000D7FAC File Offset: 0x000D61AC
		private void CopyBoneFK()
		{
			this.m_OCIChar.fkCtrl.CopyBone((OIBoneInfo.BoneGroup)353);
		}

		// Token: 0x060023F1 RID: 9201 RVA: 0x000D7FC4 File Offset: 0x000D61C4
		private void CopyBoneIK()
		{
			this.m_OCIChar.ikCtrl.CopyBone((OIBoneInfo.BoneGroup)31);
		}

		// Token: 0x060023F2 RID: 9202 RVA: 0x000D7FD8 File Offset: 0x000D61D8
		private void Awake()
		{
			this.rootButtonInfo[3].button.gameObject.SetActive(true);
			this.stateInfo.Init();
			this.fkInfo.Init();
			this.fkInfo.buttonAnime.onClick.AddListener(delegate()
			{
				this.isFKCopy = true;
			});
			this.fkInfo.buttonReflectIK.onClick.AddListener(new UnityAction(this.CopyBoneIK));
			this.ikInfo.Init();
			this.ikInfo.buttonAnime.onClick.AddListener(delegate()
			{
				this.isIKCopy = true;
			});
			this.ikInfo.buttonReflectFK.onClick.AddListener(new UnityAction(this.CopyBoneFK));
			this.lookAtInfo.Init();
			this.neckInfo.Init();
			this.etcInfo.Init();
			this.costumeInfo.Init();
			this.jointInfo.Init();
			this.isFKCopy = false;
			this.isIKCopy = false;
			this.select = -1;
			(from _ in this.LateUpdateAsObservable()
			where this.isFKCopy && this.m_OCIChar != null
			select _).Subscribe(delegate(Unit _)
			{
				this.isFKCopy = false;
				this.CopyBoneFK();
			}).AddTo(this);
			(from _ in this.LateUpdateAsObservable()
			where this.isIKCopy && this.m_OCIChar != null
			select _).Subscribe(delegate(Unit _)
			{
				this.isIKCopy = false;
				this.CopyBoneIK();
			}).AddTo(this);
		}

		// Token: 0x040024D4 RID: 9428
		[SerializeField]
		private MPCharCtrl.RootButtonInfo[] rootButtonInfo;

		// Token: 0x040024D5 RID: 9429
		[SerializeField]
		private AnimeGroupList animeGroupList;

		// Token: 0x040024D6 RID: 9430
		[SerializeField]
		private AnimeControl animeControl;

		// Token: 0x040024D7 RID: 9431
		[SerializeField]
		private VoiceControl voiceControl;

		// Token: 0x040024D8 RID: 9432
		[SerializeField]
		private MPCharCtrl.StateInfo stateInfo = new MPCharCtrl.StateInfo();

		// Token: 0x040024D9 RID: 9433
		[SerializeField]
		private MPCharCtrl.FKInfo fkInfo = new MPCharCtrl.FKInfo();

		// Token: 0x040024DA RID: 9434
		[SerializeField]
		private MPCharCtrl.IKInfo ikInfo = new MPCharCtrl.IKInfo();

		// Token: 0x040024DB RID: 9435
		[SerializeField]
		private MPCharCtrl.LookAtInfo lookAtInfo = new MPCharCtrl.LookAtInfo();

		// Token: 0x040024DC RID: 9436
		[SerializeField]
		private MPCharCtrl.NeckInfo neckInfo = new MPCharCtrl.NeckInfo();

		// Token: 0x040024DD RID: 9437
		[SerializeField]
		private MPCharCtrl.PoseInfo poseInfo = new MPCharCtrl.PoseInfo();

		// Token: 0x040024DE RID: 9438
		[SerializeField]
		private MPCharCtrl.EtcInfo etcInfo = new MPCharCtrl.EtcInfo();

		// Token: 0x040024DF RID: 9439
		[SerializeField]
		private Button[] buttonKinematic;

		// Token: 0x040024E0 RID: 9440
		private bool isFKCopy;

		// Token: 0x040024E1 RID: 9441
		private bool isIKCopy;

		// Token: 0x040024E2 RID: 9442
		[SerializeField]
		private MPCharCtrl.CostumeInfo costumeInfo = new MPCharCtrl.CostumeInfo();

		// Token: 0x040024E3 RID: 9443
		[SerializeField]
		private MPCharCtrl.JointInfo jointInfo = new MPCharCtrl.JointInfo();

		// Token: 0x040024E4 RID: 9444
		private OCIChar m_OCIChar;

		// Token: 0x040024E5 RID: 9445
		private int kinematic = -1;

		// Token: 0x040024E6 RID: 9446
		private int select = -1;

		// Token: 0x02000580 RID: 1408
		[Serializable]
		private class CommonInfo
		{
			// Token: 0x17000459 RID: 1113
			// (set) Token: 0x060023FA RID: 9210 RVA: 0x000D81C4 File Offset: 0x000D63C4
			public virtual bool active
			{
				set
				{
					if (this.objRoot.activeSelf != value)
					{
						this.objRoot.SetActive(value);
					}
				}
			}

			// Token: 0x1700045A RID: 1114
			// (get) Token: 0x060023FB RID: 9211 RVA: 0x000D81E4 File Offset: 0x000D63E4
			// (set) Token: 0x060023FC RID: 9212 RVA: 0x000D81EC File Offset: 0x000D63EC
			public bool isUpdateInfo { get; set; }

			// Token: 0x1700045B RID: 1115
			// (get) Token: 0x060023FD RID: 9213 RVA: 0x000D81F8 File Offset: 0x000D63F8
			// (set) Token: 0x060023FE RID: 9214 RVA: 0x000D8200 File Offset: 0x000D6400
			public OCIChar ociChar { get; set; }

			// Token: 0x060023FF RID: 9215 RVA: 0x000D820C File Offset: 0x000D640C
			public virtual void Init()
			{
				this.isUpdateInfo = false;
			}

			// Token: 0x06002400 RID: 9216 RVA: 0x000D8218 File Offset: 0x000D6418
			public virtual void UpdateInfo(OCIChar _char)
			{
				this.ociChar = _char;
			}

			// Token: 0x040024E7 RID: 9447
			public GameObject objRoot;
		}

		// Token: 0x02000581 RID: 1409
		[Serializable]
		private class RootButtonInfo
		{
			// Token: 0x1700045C RID: 1116
			// (get) Token: 0x06002402 RID: 9218 RVA: 0x000D822C File Offset: 0x000D642C
			// (set) Token: 0x06002403 RID: 9219 RVA: 0x000D823C File Offset: 0x000D643C
			public bool active
			{
				get
				{
					return this.root.activeSelf;
				}
				set
				{
					if (this.root.activeSelf != value)
					{
						this.root.SetActive(value);
						this.button.image.color = ((!this.root.activeSelf) ? Color.white : Color.green);
					}
				}
			}

			// Token: 0x040024EA RID: 9450
			public Button button;

			// Token: 0x040024EB RID: 9451
			public GameObject root;
		}

		// Token: 0x02000582 RID: 1410
		[Serializable]
		public class StateCommonInfo
		{
			// Token: 0x1700045D RID: 1117
			// (get) Token: 0x06002405 RID: 9221 RVA: 0x000D82A8 File Offset: 0x000D64A8
			// (set) Token: 0x06002406 RID: 9222 RVA: 0x000D82B0 File Offset: 0x000D64B0
			public Sprite[] spriteVisible { get; set; }

			// Token: 0x1700045E RID: 1118
			// (get) Token: 0x06002407 RID: 9223 RVA: 0x000D82BC File Offset: 0x000D64BC
			// (set) Token: 0x06002408 RID: 9224 RVA: 0x000D82C4 File Offset: 0x000D64C4
			public bool isOpen
			{
				get
				{
					return this.m_Open;
				}
				set
				{
					if (Utility.SetStruct<bool>(ref this.m_Open, value))
					{
						this.Change();
					}
				}
			}

			// Token: 0x1700045F RID: 1119
			// (set) Token: 0x06002409 RID: 9225 RVA: 0x000D82E0 File Offset: 0x000D64E0
			public bool active
			{
				set
				{
					GameObject gameObject = this.buttonOpen.transform.parent.gameObject;
					if (gameObject.activeSelf != value)
					{
						gameObject.SetActive(value);
						bool flag = value & this.m_Open;
						if (this.objOpen.activeSelf != flag)
						{
							this.objOpen.SetActive(flag);
						}
					}
				}
			}

			// Token: 0x0600240A RID: 9226 RVA: 0x000D833C File Offset: 0x000D653C
			public virtual void Init(Sprite[] _spriteVisible)
			{
				this.spriteVisible = _spriteVisible;
				this.buttonOpen.onClick.AddListener(new UnityAction(this.OnClick));
				this.m_Open = true;
			}

			// Token: 0x0600240B RID: 9227 RVA: 0x000D8368 File Offset: 0x000D6568
			public virtual void UpdateInfo(OCIChar _char)
			{
			}

			// Token: 0x0600240C RID: 9228 RVA: 0x000D836C File Offset: 0x000D656C
			private void OnClick()
			{
				this.isOpen = !this.isOpen;
			}

			// Token: 0x0600240D RID: 9229 RVA: 0x000D8380 File Offset: 0x000D6580
			private void Change()
			{
				if (this.objOpen.activeSelf != this.m_Open)
				{
					this.objOpen.SetActive(this.m_Open);
				}
				this.buttonOpen.image.sprite = this.spriteVisible[(!this.m_Open) ? 0 : 1];
			}

			// Token: 0x040024ED RID: 9453
			public Button buttonOpen;

			// Token: 0x040024EE RID: 9454
			public GameObject objOpen;

			// Token: 0x040024EF RID: 9455
			private bool m_Open = true;
		}

		// Token: 0x02000583 RID: 1411
		[Serializable]
		public class StateButtonInfo
		{
			// Token: 0x17000460 RID: 1120
			// (set) Token: 0x0600240F RID: 9231 RVA: 0x000D83E8 File Offset: 0x000D65E8
			public bool interactable
			{
				set
				{
					for (int i = 0; i < this.buttons.Length; i++)
					{
						this.buttons[i].interactable = value;
					}
				}
			}

			// Token: 0x17000461 RID: 1121
			// (set) Token: 0x06002410 RID: 9232 RVA: 0x000D841C File Offset: 0x000D661C
			public int select
			{
				set
				{
					int num = Mathf.Clamp(value, 0, this.buttons.Length - 1);
					for (int i = 0; i < this.buttons.Length; i++)
					{
						this.buttons[i].image.color = ((!this.buttons[i].interactable || i != num) ? Color.white : Color.green);
					}
				}
			}

			// Token: 0x17000462 RID: 1122
			// (set) Token: 0x06002411 RID: 9233 RVA: 0x000D8490 File Offset: 0x000D6690
			public bool active
			{
				set
				{
					if (this.root && this.root.activeSelf != value)
					{
						this.root.SetActive(value);
					}
				}
			}

			// Token: 0x06002412 RID: 9234 RVA: 0x000D84C0 File Offset: 0x000D66C0
			public void Interactable(int _state, bool _flag)
			{
				this.buttons[_state].interactable = _flag;
			}

			// Token: 0x040024F0 RID: 9456
			public GameObject root;

			// Token: 0x040024F1 RID: 9457
			public Button[] buttons;
		}

		// Token: 0x02000584 RID: 1412
		[Serializable]
		public class StateSliderInfo
		{
			// Token: 0x17000463 RID: 1123
			// (set) Token: 0x06002414 RID: 9236 RVA: 0x000D84D8 File Offset: 0x000D66D8
			public bool active
			{
				set
				{
					if (this.root && this.root.activeSelf != value)
					{
						this.root.SetActive(value);
					}
				}
			}

			// Token: 0x040024F2 RID: 9458
			public GameObject root;

			// Token: 0x040024F3 RID: 9459
			public Slider slider;
		}

		// Token: 0x02000585 RID: 1413
		[Serializable]
		public class StateToggleInfo
		{
			// Token: 0x17000464 RID: 1124
			// (set) Token: 0x06002416 RID: 9238 RVA: 0x000D8510 File Offset: 0x000D6710
			public bool active
			{
				set
				{
					if (this.root && this.root.activeSelf != value)
					{
						this.root.SetActive(value);
					}
				}
			}

			// Token: 0x040024F4 RID: 9460
			public GameObject root;

			// Token: 0x040024F5 RID: 9461
			public Toggle toggle;
		}

		// Token: 0x02000586 RID: 1414
		[Serializable]
		public class StateTogglesInfo
		{
			// Token: 0x17000465 RID: 1125
			// (set) Token: 0x06002418 RID: 9240 RVA: 0x000D8548 File Offset: 0x000D6748
			public bool active
			{
				set
				{
					if (this.root && this.root.activeSelf != value)
					{
						this.root.SetActive(value);
					}
				}
			}

			// Token: 0x17000466 RID: 1126
			// (set) Token: 0x06002419 RID: 9241 RVA: 0x000D8578 File Offset: 0x000D6778
			public int select
			{
				set
				{
					if (MathfEx.RangeEqualOn<int>(0, value, this.toggle.Length - 1))
					{
						this.toggle[value].isOn = true;
					}
				}
			}

			// Token: 0x040024F6 RID: 9462
			public GameObject root;

			// Token: 0x040024F7 RID: 9463
			public Toggle[] toggle;
		}

		// Token: 0x02000587 RID: 1415
		[Serializable]
		public class ClothingDetailsInfo : MPCharCtrl.StateCommonInfo
		{
			// Token: 0x17000467 RID: 1127
			// (get) Token: 0x0600241B RID: 9243 RVA: 0x000D8644 File Offset: 0x000D6844
			private MPCharCtrl.StateButtonInfo[] infoArray
			{
				get
				{
					return new MPCharCtrl.StateButtonInfo[]
					{
						this.top,
						this.buttom,
						this.bra,
						this.shorts,
						this.swimsuitTop,
						this.swimsuitButtom,
						this.topSwimsuit,
						this.buttomSwimsuit,
						this.gloves,
						this.pantyhose,
						this.socks,
						this.shoes
					};
				}
			}

			// Token: 0x0600241C RID: 9244 RVA: 0x000D86C8 File Offset: 0x000D68C8
			public void Init(Sprite[] _spriteVisible, MPCharCtrl.ClothingDetailsInfo.OnClickFunc _func)
			{
				base.Init(_spriteVisible);
				MPCharCtrl.StateButtonInfo[] infoArray = this.infoArray;
				for (int i = 0; i < infoArray.Length; i++)
				{
					int id = i;
					this.SetFunc(infoArray[i], _func, id);
				}
				this.SetFunc(this.cloth, _func, infoArray.Length);
			}

			// Token: 0x0600241D RID: 9245 RVA: 0x000D8714 File Offset: 0x000D6914
			public override void UpdateInfo(OCIChar _char)
			{
				base.UpdateInfo(_char);
				MPCharCtrl.StateButtonInfo[] infoArray = this.infoArray;
				if (_char.oiCharInfo.sex == 1)
				{
					for (int i = 0; i < infoArray.Length; i++)
					{
						infoArray[i].active = true;
						infoArray[i].interactable = _char.charInfo.IsClothesStateKind(i);
						infoArray[i].select = (int)_char.charStatus.clothesState[i];
					}
					this.cloth.active = false;
				}
				else
				{
					for (int j = 0; j < infoArray.Length; j++)
					{
						infoArray[j].active = false;
					}
					this.cloth.active = true;
					this.cloth.select = (int)_char.charStatus.clothesState[0];
					this.shoes.interactable = true;
					this.shoes.select = (int)_char.charStatus.clothesState[1];
				}
			}

			// Token: 0x0600241E RID: 9246 RVA: 0x000D87FC File Offset: 0x000D69FC
			private void SetFunc(MPCharCtrl.StateButtonInfo _info, MPCharCtrl.ClothingDetailsInfo.OnClickFunc _func, int _id)
			{
				for (int i = 0; i < _info.buttons.Length; i++)
				{
					byte state = (byte)((_info.buttons.Length - 1 != i) ? i : 2);
					_info.buttons[i].onClick.AddListener(delegate()
					{
						_func(_id, state);
					});
					_info.buttons[i].onClick.AddListener(delegate()
					{
						_info.select = (int)state;
					});
				}
			}

			// Token: 0x040024F8 RID: 9464
			public MPCharCtrl.StateButtonInfo top = new MPCharCtrl.StateButtonInfo();

			// Token: 0x040024F9 RID: 9465
			public MPCharCtrl.StateButtonInfo buttom = new MPCharCtrl.StateButtonInfo();

			// Token: 0x040024FA RID: 9466
			public MPCharCtrl.StateButtonInfo bra = new MPCharCtrl.StateButtonInfo();

			// Token: 0x040024FB RID: 9467
			public MPCharCtrl.StateButtonInfo shorts = new MPCharCtrl.StateButtonInfo();

			// Token: 0x040024FC RID: 9468
			public MPCharCtrl.StateButtonInfo swimsuitTop = new MPCharCtrl.StateButtonInfo();

			// Token: 0x040024FD RID: 9469
			public MPCharCtrl.StateButtonInfo swimsuitButtom = new MPCharCtrl.StateButtonInfo();

			// Token: 0x040024FE RID: 9470
			public MPCharCtrl.StateButtonInfo topSwimsuit = new MPCharCtrl.StateButtonInfo();

			// Token: 0x040024FF RID: 9471
			public MPCharCtrl.StateButtonInfo buttomSwimsuit = new MPCharCtrl.StateButtonInfo();

			// Token: 0x04002500 RID: 9472
			public MPCharCtrl.StateButtonInfo pantyhose = new MPCharCtrl.StateButtonInfo();

			// Token: 0x04002501 RID: 9473
			public MPCharCtrl.StateButtonInfo gloves = new MPCharCtrl.StateButtonInfo();

			// Token: 0x04002502 RID: 9474
			public MPCharCtrl.StateButtonInfo socks = new MPCharCtrl.StateButtonInfo();

			// Token: 0x04002503 RID: 9475
			public MPCharCtrl.StateButtonInfo cloth = new MPCharCtrl.StateButtonInfo();

			// Token: 0x04002504 RID: 9476
			public MPCharCtrl.StateButtonInfo shoes = new MPCharCtrl.StateButtonInfo();

			// Token: 0x02000588 RID: 1416
			// (Invoke) Token: 0x06002420 RID: 9248
			public delegate void OnClickFunc(int _id, byte _state);
		}

		// Token: 0x0200058B RID: 1419
		[Serializable]
		public class AccessoriesInfo : MPCharCtrl.StateCommonInfo
		{
			// Token: 0x06002428 RID: 9256 RVA: 0x000D891C File Offset: 0x000D6B1C
			public void Init(Sprite[] _spriteVisible, MPCharCtrl.AccessoriesInfo.OnClickFunc _func)
			{
				base.Init(_spriteVisible);
				for (int i = 0; i < 10; i++)
				{
					int id = i;
					for (int j = 0; j < 2; j++)
					{
						bool flag = j == 0;
						this.slots[i].buttons[j].onClick.AddListener(delegate()
						{
							_func(id, flag);
						});
						int state = j;
						this.slots[i].buttons[j].onClick.AddListener(delegate()
						{
							this.slots[id].select = state;
						});
					}
				}
			}

			// Token: 0x06002429 RID: 9257 RVA: 0x000D89EC File Offset: 0x000D6BEC
			public override void UpdateInfo(OCIChar _char)
			{
				base.UpdateInfo(_char);
				for (int i = 0; i < 10; i++)
				{
					this.slots[i].interactable = _char.charInfo.human.accessories.IsAttachedAccessory(i);
				}
				for (int j = 0; j < 10; j++)
				{
					this.slots[j].select = ((!_char.charStatus.showAccessory[j]) ? 1 : 0);
				}
			}

			// Token: 0x0400250A RID: 9482
			public MPCharCtrl.StateButtonInfo[] slots = new MPCharCtrl.StateButtonInfo[10];

			// Token: 0x0200058C RID: 1420
			// (Invoke) Token: 0x0600242B RID: 9259
			public delegate void OnClickFunc(int _id, bool _flag);
		}

		// Token: 0x02000590 RID: 1424
		[Serializable]
		public class LiquidInfo : MPCharCtrl.StateCommonInfo
		{
			// Token: 0x06002434 RID: 9268 RVA: 0x000D8B18 File Offset: 0x000D6D18
			public void Init(Sprite[] _spriteVisible, MPCharCtrl.LiquidInfo.OnClickFunc _func)
			{
				base.Init(_spriteVisible);
				this.SetFunc(this.face, _func, CharDefine.SiruParts.SiruKao);
				this.SetFunc(this.breast, _func, CharDefine.SiruParts.SiruFrontUp);
				this.SetFunc(this.back, _func, CharDefine.SiruParts.SiruBackUp);
				this.SetFunc(this.belly, _func, CharDefine.SiruParts.SiruFrontDown);
				this.SetFunc(this.hip, _func, CharDefine.SiruParts.SiruBackDown);
			}

			// Token: 0x06002435 RID: 9269 RVA: 0x000D8B74 File Offset: 0x000D6D74
			public override void UpdateInfo(OCIChar _char)
			{
				base.UpdateInfo(_char);
				if (_char.oiCharInfo.sex == 1)
				{
					base.active = true;
					this.face.select = (int)_char.GetSiruFlags(CharDefine.SiruParts.SiruKao);
					this.breast.select = (int)_char.GetSiruFlags(CharDefine.SiruParts.SiruFrontUp);
					this.back.select = (int)_char.GetSiruFlags(CharDefine.SiruParts.SiruBackUp);
					this.belly.select = (int)_char.GetSiruFlags(CharDefine.SiruParts.SiruFrontDown);
					this.hip.select = (int)_char.GetSiruFlags(CharDefine.SiruParts.SiruBackDown);
				}
				else
				{
					base.active = false;
				}
			}

			// Token: 0x06002436 RID: 9270 RVA: 0x000D8C08 File Offset: 0x000D6E08
			private void SetFunc(MPCharCtrl.StateButtonInfo _info, MPCharCtrl.LiquidInfo.OnClickFunc _func, CharDefine.SiruParts _parts)
			{
				for (int i = 0; i < _info.buttons.Length; i++)
				{
					byte state = (byte)i;
					_info.buttons[i].onClick.AddListener(delegate()
					{
						_func(_parts, state);
					});
					_info.buttons[i].onClick.AddListener(delegate()
					{
						_info.select = (int)state;
					});
				}
			}

			// Token: 0x04002512 RID: 9490
			public MPCharCtrl.StateButtonInfo face = new MPCharCtrl.StateButtonInfo();

			// Token: 0x04002513 RID: 9491
			public MPCharCtrl.StateButtonInfo breast = new MPCharCtrl.StateButtonInfo();

			// Token: 0x04002514 RID: 9492
			public MPCharCtrl.StateButtonInfo back = new MPCharCtrl.StateButtonInfo();

			// Token: 0x04002515 RID: 9493
			public MPCharCtrl.StateButtonInfo belly = new MPCharCtrl.StateButtonInfo();

			// Token: 0x04002516 RID: 9494
			public MPCharCtrl.StateButtonInfo hip = new MPCharCtrl.StateButtonInfo();

			// Token: 0x02000591 RID: 1425
			// (Invoke) Token: 0x06002438 RID: 9272
			public delegate void OnClickFunc(CharDefine.SiruParts _parts, byte _state);
		}

		// Token: 0x02000594 RID: 1428
		[Serializable]
		public class OtherInfo : MPCharCtrl.StateCommonInfo
		{
			// Token: 0x06002440 RID: 9280 RVA: 0x000D8D64 File Offset: 0x000D6F64
			public override void UpdateInfo(OCIChar _char)
			{
				base.UpdateInfo(_char);
				bool flag = _char.oiCharInfo.sex == 1;
				this.tears.active = flag;
				this.cheek.active = flag;
				this.nipple.active = flag;
				this.skin.active = flag;
				this.face.active = flag;
				this.single.active = !flag;
				this.color.active = !flag;
				this.son.active = !flag;
				if (flag)
				{
					this.tears.slider.value = _char.GetTearsLv();
					this.cheek.slider.value = _char.GetHohoAkaRate();
					this.nipple.slider.value = _char.oiCharInfo.nipple;
					this.skin.slider.value = _char.oiCharInfo.skinRate;
					this.face.select = _char.oiCharInfo.faceOption;
				}
				else
				{
					this.single.toggle.isOn = _char.GetVisibleSimple();
					this.SetSimpleColor(_char.oiCharInfo.simpleColor);
					this.son.toggle.isOn = _char.oiCharInfo.visibleSon;
				}
			}

			// Token: 0x06002441 RID: 9281 RVA: 0x000D8EB8 File Offset: 0x000D70B8
			public void SetSimpleColor(Color _color)
			{
				this.color.buttons[0].image.color = _color;
			}

			// Token: 0x0400251C RID: 9500
			public MPCharCtrl.StateSliderInfo tears = new MPCharCtrl.StateSliderInfo();

			// Token: 0x0400251D RID: 9501
			public MPCharCtrl.StateSliderInfo cheek = new MPCharCtrl.StateSliderInfo();

			// Token: 0x0400251E RID: 9502
			public MPCharCtrl.StateSliderInfo nipple = new MPCharCtrl.StateSliderInfo();

			// Token: 0x0400251F RID: 9503
			public MPCharCtrl.StateSliderInfo skin = new MPCharCtrl.StateSliderInfo();

			// Token: 0x04002520 RID: 9504
			public MPCharCtrl.StateTogglesInfo face = new MPCharCtrl.StateTogglesInfo();

			// Token: 0x04002521 RID: 9505
			public MPCharCtrl.StateToggleInfo single = new MPCharCtrl.StateToggleInfo();

			// Token: 0x04002522 RID: 9506
			public MPCharCtrl.StateButtonInfo color = new MPCharCtrl.StateButtonInfo();

			// Token: 0x04002523 RID: 9507
			public MPCharCtrl.StateToggleInfo son = new MPCharCtrl.StateToggleInfo();

			// Token: 0x02000595 RID: 1429
			// (Invoke) Token: 0x06002443 RID: 9283
			public delegate void OnClickTears(byte _state);
		}

		// Token: 0x02000596 RID: 1430
		[Serializable]
		private class StateInfo : MPCharCtrl.CommonInfo
		{
			// Token: 0x06002447 RID: 9287 RVA: 0x000D8F08 File Offset: 0x000D7108
			public override void Init()
			{
				base.Init();
				this.buttonCosState[0].onClick.AddListener(delegate()
				{
					this.OnClickCosState(0);
				});
				this.buttonCosState[1].onClick.AddListener(delegate()
				{
					this.OnClickCosState(1);
				});
				this.buttonCosState[2].onClick.AddListener(delegate()
				{
					this.OnClickCosState(2);
				});
				this.clothingDetailsInfo.Init(this.spriteVisible, new MPCharCtrl.ClothingDetailsInfo.OnClickFunc(this.OnClickClothingDetails));
				this.accessoriesInfo.Init(this.spriteVisible, new MPCharCtrl.AccessoriesInfo.OnClickFunc(this.OnClickAccessories));
				this.liquidInfo.Init(this.spriteVisible, new MPCharCtrl.LiquidInfo.OnClickFunc(this.OnClickLiquid));
				this.otherInfo.Init(this.spriteVisible);
				this.otherInfo.tears.slider.onValueChanged.AddListener(new UnityAction<float>(this.OnValueChangedTears));
				this.otherInfo.cheek.slider.onValueChanged.AddListener(new UnityAction<float>(this.OnValueChangedCheek));
				this.otherInfo.nipple.slider.onValueChanged.AddListener(new UnityAction<float>(this.OnValueChangedNipple));
				this.otherInfo.skin.slider.onValueChanged.AddListener(new UnityAction<float>(this.OnValueChangedSkin));
				this.otherInfo.single.toggle.onValueChanged.AddListener(new UnityAction<bool>(this.OnValueChangedSimple));
				this.otherInfo.color.buttons[0].onClick.AddListener(new UnityAction(this.OnClickSimpleColor));
				this.otherInfo.son.toggle.onValueChanged.AddListener(new UnityAction<bool>(this.OnValueChangedSon));
				for (int i = 0; i < this.otherInfo.face.toggle.Length; i++)
				{
					int no = i;
					this.otherInfo.face.toggle[i].onValueChanged.AddListener(delegate(bool b)
					{
						if (b)
						{
							this.OnValueChangedFaceOption(no);
						}
					});
				}
			}

			// Token: 0x06002448 RID: 9288 RVA: 0x000D9148 File Offset: 0x000D7348
			public override void UpdateInfo(OCIChar _char)
			{
				base.UpdateInfo(_char);
				base.isUpdateInfo = true;
				this.buttonCosState[1].interactable = (_char.oiCharInfo.sex == 1);
				this.clothingDetailsInfo.UpdateInfo(_char);
				this.accessoriesInfo.UpdateInfo(_char);
				this.liquidInfo.UpdateInfo(_char);
				this.otherInfo.UpdateInfo(_char);
				base.isUpdateInfo = false;
			}

			// Token: 0x06002449 RID: 9289 RVA: 0x000D91B8 File Offset: 0x000D73B8
			private void OnClickCosState(int _value)
			{
				base.ociChar.SetClothesStateAll(_value);
				this.clothingDetailsInfo.UpdateInfo(base.ociChar);
			}

			// Token: 0x0600244A RID: 9290 RVA: 0x000D91D8 File Offset: 0x000D73D8
			private void OnClickClothingDetails(int _id, byte _state)
			{
				if (_id == 12)
				{
					base.ociChar.SetClothesState(0, _state);
				}
				else
				{
					base.ociChar.SetClothesState(_id, _state);
				}
			}

			// Token: 0x0600244B RID: 9291 RVA: 0x000D9204 File Offset: 0x000D7404
			private void OnClickAccessories(int _id, bool _flag)
			{
				base.ociChar.ShowAccessory(_id, _flag);
			}

			// Token: 0x0600244C RID: 9292 RVA: 0x000D9214 File Offset: 0x000D7414
			private void OnClickLiquid(CharDefine.SiruParts _parts, byte _state)
			{
				base.ociChar.SetSiruFlags(_parts, _state);
			}

			// Token: 0x0600244D RID: 9293 RVA: 0x000D9224 File Offset: 0x000D7424
			private void OnValueChangedTears(float _value)
			{
				if (base.isUpdateInfo)
				{
					return;
				}
				base.ociChar.SetTearsLv(_value);
			}

			// Token: 0x0600244E RID: 9294 RVA: 0x000D9240 File Offset: 0x000D7440
			private void OnValueChangedCheek(float _value)
			{
				if (base.isUpdateInfo)
				{
					return;
				}
				base.ociChar.SetHohoAkaRate(_value);
			}

			// Token: 0x0600244F RID: 9295 RVA: 0x000D925C File Offset: 0x000D745C
			private void OnValueChangedNipple(float _value)
			{
				if (base.isUpdateInfo)
				{
					return;
				}
				base.ociChar.SetNipStand(_value);
			}

			// Token: 0x06002450 RID: 9296 RVA: 0x000D9278 File Offset: 0x000D7478
			private void OnValueChangedSkin(float _value)
			{
				if (base.isUpdateInfo)
				{
					return;
				}
				base.ociChar.SetTuyaRate(_value);
			}

			// Token: 0x06002451 RID: 9297 RVA: 0x000D9294 File Offset: 0x000D7494
			private void OnValueChangedSimple(bool _value)
			{
				if (base.isUpdateInfo)
				{
					return;
				}
				base.ociChar.SetVisibleSimple(_value);
			}

			// Token: 0x06002452 RID: 9298 RVA: 0x000D92B0 File Offset: 0x000D74B0
			private void OnClickSimpleColor()
			{
				Singleton<Studio>.Instance.colorMenu.updateColorFunc = new UI_ColorInfo.UpdateColor(this.OnValueChangeSimpleColor);
				Singleton<Studio>.Instance.colorMenu.SetColor(base.ociChar.oiCharInfo.simpleColor, UI_ColorInfo.ControlType.PresetsSample);
				Singleton<Studio>.Instance.colorPaletteCtrl.visible = true;
			}

			// Token: 0x06002453 RID: 9299 RVA: 0x000D930C File Offset: 0x000D750C
			private void OnValueChangeSimpleColor(Color _color)
			{
				base.ociChar.SetSimpleColor(_color);
				this.otherInfo.SetSimpleColor(_color);
			}

			// Token: 0x06002454 RID: 9300 RVA: 0x000D9328 File Offset: 0x000D7528
			private void OnValueChangedSon(bool _value)
			{
				if (base.isUpdateInfo)
				{
					return;
				}
				base.ociChar.SetVisibleSon(_value);
			}

			// Token: 0x06002455 RID: 9301 RVA: 0x000D9344 File Offset: 0x000D7544
			private void OnValueChangedFaceOption(int _select)
			{
				if (base.isUpdateInfo)
				{
					return;
				}
				base.ociChar.ChangeFaceOption(_select);
			}

			// Token: 0x04002524 RID: 9508
			public Sprite[] spriteVisible;

			// Token: 0x04002525 RID: 9509
			public Button[] buttonCosType;

			// Token: 0x04002526 RID: 9510
			public Button[] buttonCosState;

			// Token: 0x04002527 RID: 9511
			public MPCharCtrl.ClothingDetailsInfo clothingDetailsInfo = new MPCharCtrl.ClothingDetailsInfo();

			// Token: 0x04002528 RID: 9512
			public MPCharCtrl.AccessoriesInfo accessoriesInfo = new MPCharCtrl.AccessoriesInfo();

			// Token: 0x04002529 RID: 9513
			public MPCharCtrl.LiquidInfo liquidInfo = new MPCharCtrl.LiquidInfo();

			// Token: 0x0400252A RID: 9514
			public MPCharCtrl.OtherInfo otherInfo = new MPCharCtrl.OtherInfo();
		}

		// Token: 0x02000598 RID: 1432
		[Serializable]
		private class FKInfo : MPCharCtrl.CommonInfo
		{
			// Token: 0x0600245C RID: 9308 RVA: 0x000D93B0 File Offset: 0x000D75B0
			public override void Init()
			{
				base.Init();
				this.toggleFunction.onValueChanged.AddListener(new UnityAction<bool>(this.OnChangeValueFunction));
				this.toggleHair.onValueChanged.AddListener(delegate(bool b)
				{
					this.OnChangeValueIndividual(OIBoneInfo.BoneGroup.Hair, b);
				});
				this.toggleNeck.onValueChanged.AddListener(delegate(bool b)
				{
					this.OnChangeValueIndividual(OIBoneInfo.BoneGroup.Neck, b);
				});
				this.toggleBreast.onValueChanged.AddListener(delegate(bool b)
				{
					this.OnChangeValueIndividual(OIBoneInfo.BoneGroup.Breast, b);
				});
				this.toggleBody.onValueChanged.AddListener(delegate(bool b)
				{
					this.OnChangeValueIndividual(OIBoneInfo.BoneGroup.Body, b);
				});
				this.toggleRightHand.onValueChanged.AddListener(delegate(bool b)
				{
					this.OnChangeValueIndividual(OIBoneInfo.BoneGroup.RightHand, b);
				});
				this.toggleLeftHand.onValueChanged.AddListener(delegate(bool b)
				{
					this.OnChangeValueIndividual(OIBoneInfo.BoneGroup.LeftHand, b);
				});
				this.toggleSkirt.onValueChanged.AddListener(delegate(bool b)
				{
					this.OnChangeValueIndividual(OIBoneInfo.BoneGroup.Skirt, b);
				});
				this.sliderSize.onValueChanged.AddListener(new UnityAction<float>(this.OnValueChangedSize));
				this.array = new Toggle[]
				{
					this.toggleHair,
					this.toggleNeck,
					this.toggleBreast,
					this.toggleBody,
					this.toggleRightHand,
					this.toggleLeftHand,
					this.toggleSkirt
				};
			}

			// Token: 0x0600245D RID: 9309 RVA: 0x000D950C File Offset: 0x000D770C
			public override void UpdateInfo(OCIChar _char)
			{
				base.UpdateInfo(_char);
				base.isUpdateInfo = true;
				this.toggleFunction.isOn = _char.oiCharInfo.enableFK;
				for (int i = 0; i < this.array.Length; i++)
				{
					this.array[i].isOn = _char.oiCharInfo.activeFK[i];
				}
				this.buttonReflectIK.interactable = _char.oiCharInfo.enableFK;
				this.toggleHair.interactable = (_char.oiCharInfo.sex != 0 || _char.IsFKGroup(OIBoneInfo.BoneGroup.Hair));
				this.toggleBreast.interactable = (_char.oiCharInfo.sex != 0 || _char.IsFKGroup(OIBoneInfo.BoneGroup.Breast));
				this.toggleSkirt.interactable = (_char.oiCharInfo.sex != 0 || _char.IsFKGroup(OIBoneInfo.BoneGroup.Skirt));
				base.isUpdateInfo = false;
			}

			// Token: 0x0600245E RID: 9310 RVA: 0x000D9614 File Offset: 0x000D7814
			private void OnChangeValueFunction(bool _value)
			{
				if (base.isUpdateInfo)
				{
					return;
				}
				base.ociChar.ActiveKinematicMode(OICharInfo.KinematicMode.FK, _value, false);
				this.buttonReflectIK.interactable = _value;
			}

			// Token: 0x0600245F RID: 9311 RVA: 0x000D963C File Offset: 0x000D783C
			private void OnChangeValueIndividual(OIBoneInfo.BoneGroup _group, bool _value)
			{
				if (base.isUpdateInfo)
				{
					return;
				}
				base.ociChar.ActiveFK(_group, _value, false);
			}

			// Token: 0x06002460 RID: 9312 RVA: 0x000D9658 File Offset: 0x000D7858
			private void OnValueChangedSize(float _value)
			{
				if (base.isUpdateInfo)
				{
					return;
				}
				foreach (OCIChar.BoneInfo boneInfo in base.ociChar.listBones)
				{
					boneInfo.scaleRate = _value;
				}
			}

			// Token: 0x0400252D RID: 9517
			public Toggle toggleFunction;

			// Token: 0x0400252E RID: 9518
			public Toggle toggleHair;

			// Token: 0x0400252F RID: 9519
			public Toggle toggleNeck;

			// Token: 0x04002530 RID: 9520
			public Toggle toggleBreast;

			// Token: 0x04002531 RID: 9521
			public Toggle toggleBody;

			// Token: 0x04002532 RID: 9522
			public Toggle toggleRightHand;

			// Token: 0x04002533 RID: 9523
			public Toggle toggleLeftHand;

			// Token: 0x04002534 RID: 9524
			public Toggle toggleSkirt;

			// Token: 0x04002535 RID: 9525
			public Slider sliderSize;

			// Token: 0x04002536 RID: 9526
			public Button buttonAnime;

			// Token: 0x04002537 RID: 9527
			public Button buttonReflectIK;

			// Token: 0x04002538 RID: 9528
			private Toggle[] array;
		}

		// Token: 0x02000599 RID: 1433
		[Serializable]
		private class IKInfo : MPCharCtrl.CommonInfo
		{
			// Token: 0x06002469 RID: 9321 RVA: 0x000D9734 File Offset: 0x000D7934
			public override void Init()
			{
				base.Init();
				this.toggleFunction.onValueChanged.AddListener(new UnityAction<bool>(this.OnChangeValueFunction));
				this.toggleAll.onValueChanged.AddListener(new UnityAction<bool>(this.OnValueChangedAll));
				this.toggleBody.onValueChanged.AddListener(delegate(bool b)
				{
					this.OnChangeValueIndividual(0, b);
				});
				this.toggleRightLeg.onValueChanged.AddListener(delegate(bool b)
				{
					this.OnChangeValueIndividual(1, b);
				});
				this.toggleLeftLeg.onValueChanged.AddListener(delegate(bool b)
				{
					this.OnChangeValueIndividual(2, b);
				});
				this.toggleRightHand.onValueChanged.AddListener(delegate(bool b)
				{
					this.OnChangeValueIndividual(3, b);
				});
				this.toggleLeftHand.onValueChanged.AddListener(delegate(bool b)
				{
					this.OnChangeValueIndividual(4, b);
				});
				this.sliderSize.onValueChanged.AddListener(new UnityAction<float>(this.OnValueChangedSize));
				this.array = new Toggle[]
				{
					this.toggleBody,
					this.toggleRightLeg,
					this.toggleLeftLeg,
					this.toggleRightHand,
					this.toggleLeftHand
				};
			}

			// Token: 0x0600246A RID: 9322 RVA: 0x000D9860 File Offset: 0x000D7A60
			public override void UpdateInfo(OCIChar _char)
			{
				base.UpdateInfo(_char);
				base.isUpdateInfo = true;
				this.toggleFunction.isOn = base.ociChar.oiCharInfo.enableIK;
				bool flag = false;
				for (int i = 0; i < 5; i++)
				{
					this.array[i].isOn = base.ociChar.oiCharInfo.activeIK[i];
					flag |= base.ociChar.oiCharInfo.activeIK[i];
				}
				this.toggleAll.isOn = flag;
				this.buttonReflectFK.interactable = base.ociChar.oiCharInfo.enableIK;
				this.toggleAll.interactable = base.ociChar.oiCharInfo.enableIK;
				for (int j = 0; j < 5; j++)
				{
					this.array[j].interactable = base.ociChar.oiCharInfo.enableIK;
				}
				base.isUpdateInfo = false;
			}

			// Token: 0x0600246B RID: 9323 RVA: 0x000D9958 File Offset: 0x000D7B58
			private void OnChangeValueFunction(bool _value)
			{
				if (base.isUpdateInfo)
				{
					return;
				}
				base.ociChar.ActiveKinematicMode(OICharInfo.KinematicMode.IK, _value, false);
				this.buttonReflectFK.interactable = _value;
				this.toggleAll.interactable = _value;
				for (int i = 0; i < 5; i++)
				{
					this.array[i].interactable = _value;
				}
			}

			// Token: 0x0600246C RID: 9324 RVA: 0x000D99B8 File Offset: 0x000D7BB8
			private void OnValueChangedAll(bool _value)
			{
				if (base.isUpdateInfo)
				{
					return;
				}
				for (int i = 0; i < 5; i++)
				{
					this.array[i].isOn = _value;
				}
			}

			// Token: 0x0600246D RID: 9325 RVA: 0x000D99F4 File Offset: 0x000D7BF4
			private void OnChangeValueIndividual(int _no, bool _value)
			{
				if (base.isUpdateInfo)
				{
					return;
				}
				base.ociChar.ActiveIK((OIBoneInfo.BoneGroup)(1 << _no), _value, false);
				base.isUpdateInfo = true;
				bool flag = false;
				for (int i = 0; i < 5; i++)
				{
					flag |= base.ociChar.oiCharInfo.activeIK[i];
				}
				this.toggleAll.isOn = flag;
				base.isUpdateInfo = false;
			}

			// Token: 0x0600246E RID: 9326 RVA: 0x000D9A64 File Offset: 0x000D7C64
			private void OnValueChangedSize(float _value)
			{
				if (base.isUpdateInfo)
				{
					return;
				}
				foreach (OCIChar.IKInfo ikinfo in base.ociChar.listIKTarget)
				{
					ikinfo.scaleRate = _value;
				}
			}

			// Token: 0x04002539 RID: 9529
			public Toggle toggleFunction;

			// Token: 0x0400253A RID: 9530
			public Toggle toggleAll;

			// Token: 0x0400253B RID: 9531
			public Toggle toggleBody;

			// Token: 0x0400253C RID: 9532
			public Toggle toggleRightHand;

			// Token: 0x0400253D RID: 9533
			public Toggle toggleLeftHand;

			// Token: 0x0400253E RID: 9534
			public Toggle toggleRightLeg;

			// Token: 0x0400253F RID: 9535
			public Toggle toggleLeftLeg;

			// Token: 0x04002540 RID: 9536
			public Slider sliderSize;

			// Token: 0x04002541 RID: 9537
			public Button buttonAnime;

			// Token: 0x04002542 RID: 9538
			public Button buttonReflectFK;

			// Token: 0x04002543 RID: 9539
			private Toggle[] array;
		}

		// Token: 0x0200059A RID: 1434
		[Serializable]
		private class LookAtInfo : MPCharCtrl.CommonInfo
		{
			// Token: 0x06002475 RID: 9333 RVA: 0x000D9B18 File Offset: 0x000D7D18
			public override void Init()
			{
				base.Init();
				for (int i = 0; i < this.buttonMode.Length; i++)
				{
					int no = i;
					this.buttonMode[i].onClick.AddListener(delegate()
					{
						this.OnClick(no);
					});
				}
				this.sliderSize.onValueChanged.AddListener(new UnityAction<float>(this.OnVauleChangeSize));
			}

			// Token: 0x06002476 RID: 9334 RVA: 0x000D9B94 File Offset: 0x000D7D94
			public override void UpdateInfo(OCIChar _char)
			{
				base.UpdateInfo(_char);
				base.isUpdateInfo = true;
				int eyesLookPtn = base.ociChar.charStatus.eyesLookPtn;
				for (int i = 0; i < this.buttonMode.Length; i++)
				{
					this.buttonMode[i].image.color = ((i != eyesLookPtn) ? Color.white : Color.green);
				}
				this.sliderSize.value = _char.lookAtInfo.guideObject.scaleRate;
				this.sliderSize.interactable = (_char.charStatus.eyesLookPtn == 4);
				base.isUpdateInfo = false;
			}

			// Token: 0x06002477 RID: 9335 RVA: 0x000D9C3C File Offset: 0x000D7E3C
			private void OnClick(int _no)
			{
				int eyesLookPtn = base.ociChar.charStatus.eyesLookPtn;
				base.ociChar.ChangeLookEyesPtn(_no, false);
				this.sliderSize.interactable = (_no == 4);
				this.buttonMode[eyesLookPtn].image.color = Color.white;
				this.buttonMode[_no].image.color = Color.green;
			}

			// Token: 0x06002478 RID: 9336 RVA: 0x000D9CA4 File Offset: 0x000D7EA4
			private void OnVauleChangeSize(float _value)
			{
				if (base.isUpdateInfo)
				{
					return;
				}
				base.ociChar.lookAtInfo.guideObject.scaleRate = _value;
			}

			// Token: 0x04002544 RID: 9540
			public Button[] buttonMode;

			// Token: 0x04002545 RID: 9541
			public Slider sliderSize;
		}

		// Token: 0x0200059C RID: 1436
		[Serializable]
		private class NeckInfo : MPCharCtrl.CommonInfo
		{
			// Token: 0x0600247C RID: 9340 RVA: 0x000D9CEC File Offset: 0x000D7EEC
			public override void Init()
			{
				base.Init();
				for (int i = 0; i < this.buttonMode.Length; i++)
				{
					int no = i;
					this.buttonMode[i].onClick.AddListener(delegate()
					{
						this.OnClick(no);
					});
				}
			}

			// Token: 0x0600247D RID: 9341 RVA: 0x000D9D4C File Offset: 0x000D7F4C
			public override void UpdateInfo(OCIChar _char)
			{
				base.UpdateInfo(_char);
				base.isUpdateInfo = true;
				int neckLookPtn = base.ociChar.charStatus.neckLookPtn;
				for (int i = 0; i < this.buttonMode.Length; i++)
				{
					this.buttonMode[i].image.color = ((i != neckLookPtn) ? Color.white : Color.green);
					this.buttonMode[i].interactable = (!_char.oiCharInfo.enableFK || !_char.oiCharInfo.activeFK[1]);
				}
				base.isUpdateInfo = false;
			}

			// Token: 0x0600247E RID: 9342 RVA: 0x000D9DF0 File Offset: 0x000D7FF0
			private void OnClick(int _idx)
			{
				int neckLookPtn = base.ociChar.charStatus.neckLookPtn;
				base.ociChar.ChangeLookNeckPtn(_idx);
				this.buttonMode[neckLookPtn].image.color = Color.white;
				this.buttonMode[_idx].image.color = Color.green;
			}

			// Token: 0x04002548 RID: 9544
			public Button[] buttonMode;
		}

		// Token: 0x0200059E RID: 1438
		[Serializable]
		public class PatternInfo
		{
			// Token: 0x17000468 RID: 1128
			// (get) Token: 0x06002482 RID: 9346 RVA: 0x000D9E80 File Offset: 0x000D8080
			// (set) Token: 0x06002483 RID: 9347 RVA: 0x000D9E88 File Offset: 0x000D8088
			public int ptn
			{
				get
				{
					return this.m_Ptn;
				}
				set
				{
					if (Utility.SetStruct<int>(ref this.m_Ptn, value))
					{
						this.textPtn.text = string.Format("{00:0}", this.m_Ptn);
					}
				}
			}

			// Token: 0x17000469 RID: 1129
			// (get) Token: 0x06002484 RID: 9348 RVA: 0x000D9EBC File Offset: 0x000D80BC
			// (set) Token: 0x06002485 RID: 9349 RVA: 0x000D9EC4 File Offset: 0x000D80C4
			public int num { get; set; }

			// Token: 0x06002486 RID: 9350 RVA: 0x000D9ED0 File Offset: 0x000D80D0
			public void Init()
			{
				this.buttons[0].onClick.AddListener(delegate()
				{
					this.OnClick(-1);
				});
				this.buttons[1].onClick.AddListener(delegate()
				{
					this.OnClick(1);
				});
			}

			// Token: 0x06002487 RID: 9351 RVA: 0x000D9F10 File Offset: 0x000D8110
			private void OnClick(int _add)
			{
				int num = this.m_Ptn + _add;
				this.ptn = ((num >= 0) ? (num % this.num) : (this.num - 1));
				if (this.onClickFunc != null)
				{
					this.onClickFunc(this.m_Ptn);
				}
			}

			// Token: 0x0400254B RID: 9547
			public Button[] buttons = new Button[2];

			// Token: 0x0400254C RID: 9548
			public Text textPtn;

			// Token: 0x0400254D RID: 9549
			private int m_Ptn = -1;

			// Token: 0x0400254F RID: 9551
			public MPCharCtrl.PatternInfo.OnClickFunc onClickFunc;

			// Token: 0x0200059F RID: 1439
			// (Invoke) Token: 0x0600248B RID: 9355
			public delegate void OnClickFunc(int _no);
		}

		// Token: 0x020005A0 RID: 1440
		[Serializable]
		private class EtcInfo : MPCharCtrl.CommonInfo
		{
			// Token: 0x0600248F RID: 9359 RVA: 0x000D9FB0 File Offset: 0x000D81B0
			public override void Init()
			{
				base.Init();
				this.piEyes.Init();
				MPCharCtrl.PatternInfo patternInfo = this.piEyes;
				patternInfo.onClickFunc = (MPCharCtrl.PatternInfo.OnClickFunc)Delegate.Combine(patternInfo.onClickFunc, new MPCharCtrl.PatternInfo.OnClickFunc(this.ChangeEyesPtn));
				this.sliderEyesOpen.onValueChanged.AddListener(new UnityAction<float>(this.OnValueChangedEyesOpen));
				this.toggleBlink.onValueChanged.AddListener(new UnityAction<bool>(this.OnValueChangedEyesBlink));
				this.piMouth.Init();
				MPCharCtrl.PatternInfo patternInfo2 = this.piMouth;
				patternInfo2.onClickFunc = (MPCharCtrl.PatternInfo.OnClickFunc)Delegate.Combine(patternInfo2.onClickFunc, new MPCharCtrl.PatternInfo.OnClickFunc(this.ChangeMouthPtn));
				this.sliderMouthOpen.onValueChanged.AddListener(new UnityAction<float>(this.OnValueChangedMouthOpen));
				this.toggleLipSync.onValueChanged.AddListener(new UnityAction<bool>(this.OnValueChangedLipSync));
				this.piRightHand.Init();
				MPCharCtrl.PatternInfo patternInfo3 = this.piRightHand;
				patternInfo3.onClickFunc = (MPCharCtrl.PatternInfo.OnClickFunc)Delegate.Combine(patternInfo3.onClickFunc, new MPCharCtrl.PatternInfo.OnClickFunc(this.ChangeRightHandAnime));
				this.piLeftHand.Init();
				MPCharCtrl.PatternInfo patternInfo4 = this.piLeftHand;
				patternInfo4.onClickFunc = (MPCharCtrl.PatternInfo.OnClickFunc)Delegate.Combine(patternInfo4.onClickFunc, new MPCharCtrl.PatternInfo.OnClickFunc(this.ChangeLeftHandAnime));
			}

			// Token: 0x06002490 RID: 9360 RVA: 0x000DA0FC File Offset: 0x000D82FC
			public override void UpdateInfo(OCIChar _char)
			{
				base.UpdateInfo(_char);
				base.isUpdateInfo = true;
				this.piEyes.num = _char.charInfo.GetEyesMaxPtn();
				this.piEyes.ptn = _char.charInfo.GetEyesPtn();
				this.sliderEyesOpen.value = _char.charStatus.eyesOpen;
				this.toggleBlink.isOn = _char.charStatus.eyesBlink;
				this.piMouth.num = _char.charInfo.GetMouthMaxPtn();
				this.piMouth.ptn = _char.charInfo.GetMouthPtn();
				this.sliderMouthOpen.value = _char.charStatus.mouthFixed;
				this.toggleLipSync.isOn = _char.oiCharInfo.lipSync;
				this.piRightHand.num = _char.handAnimeCtrl[1].max;
				this.piRightHand.ptn = _char.handAnimeCtrl[1].ptn;
				this.piLeftHand.num = _char.handAnimeCtrl[0].max;
				this.piLeftHand.ptn = _char.handAnimeCtrl[0].ptn;
				base.isUpdateInfo = false;
			}

			// Token: 0x06002491 RID: 9361 RVA: 0x000DA230 File Offset: 0x000D8430
			private void ChangeEyesPtn(int _no)
			{
				base.ociChar.charInfo.ChangeEyesPtn(_no);
			}

			// Token: 0x06002492 RID: 9362 RVA: 0x000DA244 File Offset: 0x000D8444
			private void OnValueChangedEyesOpen(float _value)
			{
				base.ociChar.ChangeEyesOpen(_value);
			}

			// Token: 0x06002493 RID: 9363 RVA: 0x000DA254 File Offset: 0x000D8454
			private void OnValueChangedEyesBlink(bool _value)
			{
				if (base.isUpdateInfo)
				{
					return;
				}
				base.ociChar.ChangeBlink(_value);
			}

			// Token: 0x06002494 RID: 9364 RVA: 0x000DA270 File Offset: 0x000D8470
			private void ChangeMouthPtn(int _no)
			{
				base.ociChar.charInfo.ChangeMouthPtn(_no);
			}

			// Token: 0x06002495 RID: 9365 RVA: 0x000DA284 File Offset: 0x000D8484
			private void OnValueChangedMouthOpen(float _value)
			{
				base.ociChar.ChangeMouthOpen(_value);
			}

			// Token: 0x06002496 RID: 9366 RVA: 0x000DA294 File Offset: 0x000D8494
			private void OnValueChangedLipSync(bool _value)
			{
				if (base.isUpdateInfo)
				{
					return;
				}
				base.ociChar.ChangeLipSync(_value);
			}

			// Token: 0x06002497 RID: 9367 RVA: 0x000DA2B0 File Offset: 0x000D84B0
			private void ChangeLeftHandAnime(int _no)
			{
				base.ociChar.ChangeHandAnime(0, _no);
			}

			// Token: 0x06002498 RID: 9368 RVA: 0x000DA2C0 File Offset: 0x000D84C0
			private void ChangeRightHandAnime(int _no)
			{
				base.ociChar.ChangeHandAnime(1, _no);
			}

			// Token: 0x04002550 RID: 9552
			public MPCharCtrl.PatternInfo piEyes = new MPCharCtrl.PatternInfo();

			// Token: 0x04002551 RID: 9553
			public Slider sliderEyesOpen;

			// Token: 0x04002552 RID: 9554
			public Toggle toggleBlink;

			// Token: 0x04002553 RID: 9555
			public MPCharCtrl.PatternInfo piMouth = new MPCharCtrl.PatternInfo();

			// Token: 0x04002554 RID: 9556
			public Slider sliderMouthOpen;

			// Token: 0x04002555 RID: 9557
			public Toggle toggleLipSync;

			// Token: 0x04002556 RID: 9558
			public MPCharCtrl.PatternInfo piRightHand = new MPCharCtrl.PatternInfo();

			// Token: 0x04002557 RID: 9559
			public MPCharCtrl.PatternInfo piLeftHand = new MPCharCtrl.PatternInfo();
		}

		// Token: 0x020005A1 RID: 1441
		[Serializable]
		private class PoseInfo : MPCharCtrl.CommonInfo
		{
			// Token: 0x1700046A RID: 1130
			// (set) Token: 0x0600249A RID: 9370 RVA: 0x000DA2D8 File Offset: 0x000D84D8
			public override bool active
			{
				set
				{
					this.pauseRegistrationList.active = value;
				}
			}

			// Token: 0x0600249B RID: 9371 RVA: 0x000DA2E8 File Offset: 0x000D84E8
			public override void Init()
			{
				base.Init();
			}

			// Token: 0x0600249C RID: 9372 RVA: 0x000DA2F0 File Offset: 0x000D84F0
			public override void UpdateInfo(OCIChar _char)
			{
				base.UpdateInfo(_char);
				base.isUpdateInfo = true;
				this.pauseRegistrationList.ociChar = _char;
				base.isUpdateInfo = false;
			}

			// Token: 0x04002558 RID: 9560
			public PauseRegistrationList pauseRegistrationList;
		}

		// Token: 0x020005A2 RID: 1442
		[Serializable]
		private class CostumeInfo : MPCharCtrl.CommonInfo
		{
			// Token: 0x0600249E RID: 9374 RVA: 0x000DA330 File Offset: 0x000D8530
			public override void Init()
			{
				base.Init();
				this.buttonSort[0].onClick.AddListener(delegate()
				{
					this.OnClickSort(0);
				});
				this.buttonSort[1].onClick.AddListener(delegate()
				{
					this.OnClickSort(1);
				});
				this.buttonLoad.onClick.AddListener(new UnityAction(this.OnClickLoad));
				this.sex = -1;
			}

			// Token: 0x0600249F RID: 9375 RVA: 0x000DA3A4 File Offset: 0x000D85A4
			public override void UpdateInfo(OCIChar _char)
			{
				base.UpdateInfo(_char);
				base.isUpdateInfo = true;
				this.InitList(_char.oiCharInfo.sex);
				base.isUpdateInfo = false;
			}

			// Token: 0x060024A0 RID: 9376 RVA: 0x000DA3CC File Offset: 0x000D85CC
			private void InitList(int _sex)
			{
				if (this.sex == _sex)
				{
					return;
				}
				this.fileSort.DeleteAllNode();
				this.InitFileList(_sex);
				int count = this.fileSort.cfiList.Count;
				for (int i = 0; i < count; i++)
				{
					CharaFileInfo info = this.fileSort.cfiList[i];
					info.index = i;
					GameObject gameObject = UnityEngine.Object.Instantiate<GameObject>(this.prefabNode);
					if (!gameObject.activeSelf)
					{
						gameObject.SetActive(true);
					}
					gameObject.transform.SetParent(this.fileSort.root, false);
					info.gameSceneNode = gameObject.GetComponent<GameSceneNode>();
					info.button = gameObject.GetComponent<Button>();
					info.gameSceneNode.AddActionToButton(delegate
					{
						this.OnSelect(info.index);
					});
					info.gameSceneNode.text = info.name;
					info.gameSceneNode.listEnterAction.Add(delegate
					{
						this.LoadImage(info.index);
					});
				}
				this.sex = _sex;
				this.fileSort.Sort(0, false);
				this.buttonLoad.interactable = false;
				this.imageThumbnail.color = Color.clear;
			}

			// Token: 0x060024A1 RID: 9377 RVA: 0x000DA52C File Offset: 0x000D872C
			private void InitFileList(int _sex)
			{
				List<string> list = new List<string>();
				string path = UserData.Path + ((_sex != 1) ? "coordinate/male/" : "coordinate/female/");
				CommonLib.GetAllFiles(path, "*.png", list);
				this.fileSort.cfiList.Clear();
				foreach (string text in list)
				{
					CharaInfo charaInfo = new CharaInfo();
					charaInfo.Load(text);
					this.fileSort.cfiList.Add(new CharaFileInfo(text, charaInfo.name)
					{
						time = File.GetLastWriteTime(text)
					});
				}
			}

			// Token: 0x060024A2 RID: 9378 RVA: 0x000DA5FC File Offset: 0x000D87FC
			private void OnSelect(int _idx)
			{
				if (this.fileSort.select == _idx)
				{
					return;
				}
				this.fileSort.select = _idx;
				this.buttonLoad.interactable = true;
			}

			// Token: 0x060024A3 RID: 9379 RVA: 0x000DA628 File Offset: 0x000D8828
			private void LoadImage(int _idx)
			{
				CharaFileInfo charaFileInfo = this.fileSort.cfiList[_idx];
				this.imageThumbnail.texture = PngAssist.LoadTexture(charaFileInfo.file);
				this.imageThumbnail.color = Color.white;
				Resources.UnloadUnusedAssets();
				GC.Collect();
			}

			// Token: 0x060024A4 RID: 9380 RVA: 0x000DA678 File Offset: 0x000D8878
			private void OnClickLoad()
			{
				base.ociChar.LoadClothesFile(this.fileSort.selectPath);
			}

			// Token: 0x060024A5 RID: 9381 RVA: 0x000DA690 File Offset: 0x000D8890
			private void OnClickSort(int _type)
			{
				this.fileSort.select = -1;
				this.buttonLoad.interactable = false;
				this.fileSort.Sort(_type);
			}

			// Token: 0x04002559 RID: 9561
			public CharaFileSort fileSort = new CharaFileSort();

			// Token: 0x0400255A RID: 9562
			public GameObject prefabNode;

			// Token: 0x0400255B RID: 9563
			public RawImage imageThumbnail;

			// Token: 0x0400255C RID: 9564
			public Button[] buttonSort;

			// Token: 0x0400255D RID: 9565
			public Button buttonLoad;

			// Token: 0x0400255E RID: 9566
			private int sex = -1;
		}

		// Token: 0x020005A4 RID: 1444
		[Serializable]
		private class JointInfo : MPCharCtrl.CommonInfo
		{
			// Token: 0x060024AC RID: 9388 RVA: 0x000DA710 File Offset: 0x000D8910
			public override void Init()
			{
				base.Init();
				this.toggles[0].onValueChanged.AddListener(delegate(bool b)
				{
					this.OnValueChanged(0, b);
				});
				this.toggles[1].onValueChanged.AddListener(delegate(bool b)
				{
					this.OnValueChanged(1, b);
				});
				this.toggles[2].onValueChanged.AddListener(delegate(bool b)
				{
					this.OnValueChanged(2, b);
				});
				this.toggles[3].onValueChanged.AddListener(delegate(bool b)
				{
					this.OnValueChanged(3, b);
				});
			}

			// Token: 0x060024AD RID: 9389 RVA: 0x000DA79C File Offset: 0x000D899C
			public override void UpdateInfo(OCIChar _char)
			{
				base.UpdateInfo(_char);
				base.isUpdateInfo = true;
				for (int i = 0; i < 4; i++)
				{
					this.toggles[i].isOn = base.ociChar.oiCharInfo.expression[i];
				}
				base.isUpdateInfo = false;
			}

			// Token: 0x060024AE RID: 9390 RVA: 0x000DA7F0 File Offset: 0x000D89F0
			private void OnValueChanged(int _group, bool _value)
			{
				base.ociChar.EnableExpressionCategory(_group, _value);
			}

			// Token: 0x04002561 RID: 9569
			public Toggle[] toggles;
		}
	}
}
